home *** CD-ROM | disk | FTP | other *** search
/ CD Actual 44 / PC Actual CD 44.iso / Linux / Cygwin / full.exe / Disk1 / data1.cab / Tools / share / tix4.1 / EFileDlg.tcl < prev    next >
Encoding:
Text File  |  1998-12-04  |  1.4 KB  |  52 lines

  1. # EFileDlg.tcl --
  2. #
  3. #    Implements the Extended File Selection Dialog widget.
  4. #
  5. # Copyright (c) 1996, Expert Interface Technologies
  6. #
  7. # See the file "license.terms" for information on usage and redistribution
  8. # of this file, and for a DISCLAIMER OF ALL WARRANTIES.
  9. #
  10.  
  11. tixWidgetClass tixExFileSelectDialog {
  12.     -classname TixExFileSelectDialog
  13.     -superclass tixDialogShell
  14.     -method {}
  15.     -flag   {
  16.     -command
  17.     }
  18.     -configspec {
  19.     {-command command Command ""}
  20.  
  21.     {-title title Title "Select A File"}
  22.     }
  23. }
  24.  
  25. proc tixExFileSelectDialog:ConstructWidget {w} {
  26.     upvar #0 $w data
  27.  
  28.     tixChainMethod $w ConstructWidget
  29.     set data(w:fsbox) [tixExFileSelectBox $w.fsbox -dialog $w \
  30.     -command $data(-command)]
  31.     pack $data(w:fsbox) -expand yes -fill both
  32. }
  33.  
  34. proc tixExFileSelectDialog:config-command {w value} {
  35.     upvar #0 $w data
  36.  
  37.     $data(w:fsbox) config -command $value
  38. }
  39.  
  40. proc tixExFileSelectDialog:SetBindings {w} {
  41.     upvar #0 $w data
  42.  
  43.     tixChainMethod $w SetBindings
  44.  
  45.     bind $w <Alt-Key-f> "focus [$data(w:fsbox) subwidget file]"
  46.     bind $w <Alt-Key-t> "focus [$data(w:fsbox) subwidget types]"
  47.     bind $w <Alt-Key-d> "focus [$data(w:fsbox) subwidget dir]"
  48.     bind $w <Alt-Key-o> "tkButtonInvoke [$data(w:fsbox) subwidget ok]"
  49.     bind $w <Alt-Key-c> "tkButtonInvoke [$data(w:fsbox) subwidget cancel]"
  50.     bind $w <Alt-Key-s> "tkButtonInvoke [$data(w:fsbox) subwidget hidden]"
  51. }
  52.